#ifndef NETWORK_FORWARD_PROXY_H
#define NETWORK_FORWARD_PROXY_H

#include <sdbus-c++/sdbus-c++.h>
#include <functional>
#include <string>
#include <thread>

class NetworkForwardProxy
{
  public:
    NetworkForwardProxy();
    virtual ~NetworkForwardProxy();
    void Boot();
    std::function<long()> funcGetNetworkPort;
    std::function<long(std::string)> funcCreateTask;
    std::function<std::string(long)> funcGetStudentInfo;
    std::function<void(bool)> funcMobileConnectChange;
    std::function<void(long task_id,long stu_id)> funcStartRecord;
    std::function<void()> funcStopRecord;
    std::function<bool()> funcGetRecordStatus;
    std::function<bool(long)> funcCheckStudentExists;
  private:
    std::unique_ptr<sdbus::IObject> proxy;
    std::unique_ptr<sdbus::IConnection> connection;
    const char* InterfaceName="org.HBTY.NetworkForward";
    std::thread workThread;
};

#endif
